model.3.i.pop.cross.first <- plm(legippop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+high_settlers.impute+decol_war+col_br.impute+col_fr.impute, data=epr.final[is.na(epr.final$inclprop)==FALSE & epr.final$first.leader==1,],index=c("countries_gwid","year"),effect="time")
summary(model.3.i.pop.cross.first) 

model.3.i.p.cross.first <- plm(inclprop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party + gwf_military+first.leader+leader.size+leader.time.in.office+high_settlers.impute+decol_war+col_br.impute+col_fr.impute,data=epr.final[is.na(epr.final$inclprop)==FALSE & epr.final$first.leader==1,],index=c("countries_gwid","year"),effect="time")
summary(model.3.i.p.cross.first) 


model.3.i.pop.cross <- plm(legippop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party +leader.size++leader.time.in.office+high_settlers.impute+decol_war+col_br.impute+col_fr.impute+timeSinceLastCoup+ gwf_military+first.leader+leader.historical.count, data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),effect="time")
summary(model.3.i.pop.cross) 

model.3.i.p.cross <- plm(inclprop~past.conference.number.noIR + incidence_flag + mad_gdppc + p_polity2 + gwf_personal + gwf_party +leader.size+leader.time.in.office+high_settlers.impute+decol_war+col_br.impute+col_fr.impute+timeSinceLastCoup+ gwf_military+first.leader+leader.historical.count,data=epr.final[is.na(epr.final$inclprop)==FALSE,],index=c("countries_gwid","year"),effect="time")
summary(model.3.i.p.cross) 

coef.Names.3 <- c("Conference Count","Civil War","GDP per capita","Polity","Personalist Regime","Party Regime","Leader Group Size","Leader Time in Office","high_settlers.impute","decol_war","col_br.impute","col_fr.impute","Time Since Last Coups","Military Regime","First Leader","Leader Count")
model.Names.3 <- c("CS Proportion incl. groups","CS Proportion incl. pop","FL Proportion incl. groups","FL Proportion incl. pop")

print(
texreg(list(model.3.i.p.cross,model.3.i.pop.cross,model.3.i.p.cross.first,model.3.i.pop.cross.first),use.packages=FALSE,dcolumn=TRUE,custom.coef.names=coef.Names.3,custom.model.names=model.Names.3,stars = c(0.01, 0.05, 0.1),digits=3,scalebox=0.7,caption="Linear fixed effects models. Outcome variables: Proportion of excluded and included groups/population. Unit of analysis is the country-year. All models include year fixed effects",label="table:CSmainTable:1",caption.above=TRUE)
)
